home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games Extra 1996 June / Amiga Games Extra 1996 #6.iso / rexx / empty.iffmaster < prev    next >
Text File  |  1996-03-23  |  1KB  |  62 lines

  1. /*
  2. **  $VER: empty-IFFMaster.rexx (00 xxx 0000)  **
  3. **
  4. **        © 1996 your name
  5. **
  6. **
  7. **  PROGRAMNAME:
  8. **      name of program
  9. **
  10. **  FUNCTION:
  11. **      Use to write your own arexx scripts for IFFMaster
  12. **
  13. **  $HISTORY:
  14. **
  15. **   00 xxx 000 : 0.01 : initial release
  16. */
  17.  
  18.  
  19. PortName    = 'IFFMASTER.1'           /* portname, usually IFFMASTER.1 */
  20. LF          = '0a'x                   /* linefeed */
  21. iffmpath    = 'Gfx:Tools/IFFMaster'   /* change this to your path */
  22.  
  23. ADDRESS VALUE PortName
  24.  
  25. IFFMACTIVE=1
  26. IF ~SHOW('Ports',PortName) THEN DO
  27.     IFFMACTIVE=0        /* indicate that we did start IFFMaster through the script */
  28.     ADDRESS 'COMMAND' 'Run >NIL: GFX:Tools/IFFMaster'
  29.     ADDRESS 'COMMAND' 'WaitForPort '||PortName
  30.     IF ~SHOW('Ports',PortName) THEN EXIT 10
  31. END
  32.  
  33. SIGNAL ON SYNTAX
  34. SIGNAL ON ERROR
  35. OPTIONS RESULTS
  36.  
  37. /* ------------------------- insert your code here ------------------------- */
  38.  
  39. 'load env:mui/IFFMASTER.1.prefs'
  40. 'entries'
  41. SAY "Entries: " || RESULT
  42.  
  43. /* -------------------------    end of your code --------------------------- */
  44.  
  45. IF IFFMACTIVE=0 THEN DO
  46.     ADDRESS Value portname
  47.     'quit'     /* we started IFFMaster ourselves, so close it */
  48. END
  49.  
  50. EXIT(0)
  51.  
  52.  
  53. /* what to do on an error */
  54. ERROR:
  55. SYNTAX:
  56.  
  57.     SAY '+++ Error' rc 'in line' sigl '-' ERRORTEXT(rc)
  58.     SAY SOURCELINE(sigl)
  59.  
  60. EXIT(rc)
  61.  
  62.